package com.system.response.login;

import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Classname LoginDto
 * @Date 2023/7/31 10:30
 * @Created ZFC
 */
@Data
@ToString
public class LoginDto implements Serializable {

    @NotNull(message = "用户名不能为空")
    @Length(min = 2,max = 18,message = "用户名不能小于2位且不能超过18位")
    private String username;

    @NotNull(message = "密码不能为空")
    @Length(min = 2,max = 18,message = "密码不能小于2位且不能超过18位")
    private String password;

    @NotNull(message = "验证码不能为空")
    private String code;

    private String time;
}
